<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix='fmt' uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>后台管理_报名管理</title>
    <link rel="stylesheet" href="/css/bootstrap.min.css">
    <script src="/js/jquery-2.0.3.min.js" type="text/javascript"></script>
    <script src="/js/bootstrap.min.js"></script>
    <script language="JavaScript">
        function exportApply(){
            $("#form1").attr("action","/man/apply/export");
            $("#form1").submit();
        }
    </script>
</head>
<body>
<div class="container" >
    <div class="row">
        <div class="col-md-4"></div>
        <div class="col-md-8">
            <ul class="nav nav-pills" >
                <li><a href="/man/school/list">学校管理</a> </li>
                <li><a href="/man/article/list">文章管理</a></li>
                <li class="active"><a href="#">报名管理</a></li>
            </ul>
        </div>
    </div>
    <p class="lead"></p>
    <div class="row">
        <div class="span4 offset7">
            <form class="form-search" action="/man/apply/list" method="get" id="form1">
                <label>学校：</label> <form:select path="schoolId"  id="schoolId">
                <form:option value="0" label="请选择学校"/>
                <form:options items="${schools}" itemLabel="name" itemValue="id" id="name"/>
            </form:select>
                <button type="submit" class="btn btn-default" id="search_btn">搜索</button><button type="button" onclick="exportApply();" class="btn btn-default" id="export_btn">导出</button>
            </form>
        </div>
    </div>
    <table id="contentTable" class="table table-striped table-bordered table-condensed">
        <thead>
        <tr><th >学校名称</th><th>专业</th><th >姓名</th><th >年龄</th><th >性别</th><th >毕业院校</th><th>电话</th><th>手机</th><th>地址</th><th>qq</th><th>报名时间</th></tr>
        </thead>
        <tbody>
        <c:forEach items="${list.content}" var="apply">
            <tr>
                <td>${apply.schoolName}</td>
                <td>${specialtiyMap[apply.specialty]}</td>
                <td>${apply.name}</td>
                <td>${apply.age}</td>
                <td>${apply.sex}</td>
                <td>${apply.name}</td>
                <td>${apply.phone}</td>
                <td>${apply.mobile}</td>
                <td>${apply.address}</td>
                <td>${apply.qq}</td>
                <td><fmt:formatDate  value="${apply.createTime}" pattern="yyyy.MM.dd HH:mm:ss" /></td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <tags:pagination page="${list}" paginationSize="5"/>
</div>
</body>
</html>